package com.wish.g04.system.kafka.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 登录的kafka主题配置
 * @Author Z-7
 * @Date 2022/5/24
 */
@Configuration
public class LoginKafkaConfig {
    /**
     * 创建一个新的主题 设置3个分区 2个副本
     * @return
     */
    @Bean
    public NewTopic loginTopic() {
        return new NewTopic("wish-login",3,(short)3);
    }
}
